package com.whcoding.war.config;

import com.whcoding.war.DemoWarApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer {

	/**
	 * 若需要打成 war 包，则需要写一个类继承 {@link SpringBootServletInitializer} 并重写
	 * {@link SpringBootServletInitializer#configure(SpringApplicationBuilder)}
	 */
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(DemoWarApplication.class);
	}

}
